//
// Tile.cs
//
// Copyright (C) 2008 Lukas Lipka <lukaslipka@gmail.com>
//

using System;
using System.Collections.Generic;

using Dashboard;

namespace Dashboard.Mint.Tiles
{
	public delegate void TileSelectedDelegate (Tile tile);

	public class Tile : IComparable<Tile>
	{		
		private string title = null;
		private string description = null;

		private Match match = null;
		private DateTime created = DateTime.Now;
		private ulong window = 0;

		public event TileSelectedDelegate Selected;

		public Tile ()
		{
		}

		public Tile (Match match) : this ()
		{
			this.match = match;
		}

		public virtual Gdk.Pixbuf GetIcon (int size)
		{
			return null;
		}

		public int CompareTo (Tile other)
		{
			return other.Match.Relevancy.CompareTo (match.Relevancy);
		}

		public string Title {
			get { return title; }
			protected set { title = value; }
		}

		public string Description {
			get { return description; }
			protected set { description = value; }
		}

		public Match Match {
			get { return match; }
		}

		public DateTime Created {
			get { return created; }
		}

		public ulong Window {
			get { return window; }
			set { window = value; }
		}
	}
}
